package cn.dengta.webapp.user.entity;

import java.util.Date;

import cn.dengta.common.model.Status;
import cn.dengta.webapp.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 甜蜜投票日志
 *
 * @author lgy
 * @since 2022-11-09
 */
@Setter
@Getter
@Accessors(chain = true)
@TableName("act_sweet_pick_log")
public class ActSweetPickLog extends BaseEntity {

	/** 用户ID */
	Long userId;
	/** 投票用户ID */
	Long toUserId;
	/** 活动ID */
	Long actSweetPickId;
	/** 钻石(包含免费钻) */
	Integer coin;
	/** 免费钻石 */
	Integer freeCoin;
	/** 投票数 */
	Integer voteCount;
	/** 添加时间 */
	Date addTime;
	/** 业务状态 */
	Integer status;

	public ActSweetPickLog init(Long userId, Long toUserId, Long actSweetPickId, Integer coin, Integer freeCoin, Integer voteCount, Date now) {
		this.userId = userId;
		this.toUserId = toUserId;
		this.actSweetPickId = actSweetPickId;
		this.coin = coin;
		this.freeCoin = freeCoin;
		this.voteCount = voteCount;
		this.addTime = now;
		this.status = Status.YES.value;
		return this;
	}

	public static final String USER_ID = "user_id";
	public static final String TO_USER_ID = "to_user_id";
	public static final String ACT_SWEET_PICK_ID = "act_sweet_pick_id";
	public static final String VOTE_COUNT = "vote_count";
	public static final String ADD_TIME = "add_time";
	public static final String STATUS = "status";

}
